var constant = require('../common/constant');
var ban = require('../memory/ban.memory');

module.exports =function (req,res,next){
    console.log('operation interceptor');
    var _id = req.session.merchant._id;
    if(ban.isBan(_id)){
        console.log('be ban:'+_id);
        var response = {};
        response.result=false;
        response.code = constant.beBan;
        res.json(response);
    }else{
        next();
    }




}